package model

import (
	"gorm.io/gorm"
	"time"
)

type Articles struct {
	Id        uint64         `gorm:"column:id;type:bigint UNSIGNED;primaryKey;not null;" json:"id"`
	CreatedAt time.Time      `gorm:"column:created_at;type:datetime(3);not null;" json:"created_at"`
	UpdatedAt time.Time      `gorm:"column:updated_at;type:datetime(3);not null;" json:"updated_at"`
	DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;type:datetime(3);default:NULL;" json:"deleted_at"`
	Title     string         `gorm:"column:title;type:varchar(255);comment:文章标题;not null;" json:"title"`   // 文章标题
	Common    string         `gorm:"column:common;type:varchar(255);comment:文章评论;not null;" json:"common"` // 文章评论
	Like      uint32         `gorm:"column:like;type:int UNSIGNED;comment:文章点赞量;not null;" json:"like"`    // 文章点赞量
	Look      uint32         `gorm:"column:look;type:int UNSIGNED;comment:文章浏览量;not null;" json:"look"`    // 文章浏览量
}
